How would you select the last 100 rows of a 2-dimensional NumPy array 'X'?
X[100:,]
X[:100,]
X[,-100:]
X[-100:,]
Given a Pandas dataframe 'df' with columns 'gender' and 'age', how would you compute the average age for each gender?
df['age'].mean().groupby('gender')
df['age'].mean(groupby='gender')
df.groupby('gender')['age'].mean()
df.groupby('gender').mean('age')
Which of the following commands would you use to visualize the distribution of 'height' values in a Pandas dataframe 'df'?
df['height'].plot()
df['height'].plot(kind='line')
df['height'].plot(kind='scatter')
df['height'].plot(kind='box')